<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex align-stretch benben-position-layout flex myTrack_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex align-center justify-between flex-sub myTrack_fd0_0'>
          <view class='flex align-center myTrack_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
            <text class='fu-iconfont2  myTrack_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex align-center'>
            <text class='myTrack_fd0_0_c1_c0'>我的足迹</text>
          </view>
          <view class='flex align-center justify-end myTrack_fd0_0_c0' @tap.stop="switchTypeFunc()">
            <text class='myTrack_fd0_0_c2_c0' v-if=" dataList.length!=0 && is_edit===false">编辑</text><text
              class='myTrack_fd0_0_c2_c0_1' v-if=" is_edit===true && dataList.length!=0">完成</text>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <benben-popup v-model="popupShow1691652180194" :mask="true" :mask-close-able="true" mode='center'>
        <!---flex布局flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <benben-calendar-diy mode='range' year-arrow-color='#666666' month-arrow-color='#666666' start-text=' '
            end-text=' ' active-bg-color='rgba(45, 175, 65, 1)' range-bg-color='rgba(45, 175, 65, 0.5)'
            :change-title='true' :change-year='true' :change-month='true' class='myTrack_fd1_0'
            @change="queryListFunc()" :start-time.sync="start_time" :end-time.sync="end_time"></benben-calendar-diy>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center myTrack_flex_2">
        <view class='flex flex-wrap align-center justify-center myTrack_fd2_0' @tap.stop="popupShow1691652180194=true">
          <text class='flex-sub myTrack_fd2_0_c0' v-if="start_time==''">开始时间</text><text
            class='flex-sub myTrack_fd2_0_c0' v-if="start_time!=''">{{start_time}}</text>
          <image class='myTrack_fd2_0_c1' mode="aspectFit" :src='STATIC_URL+"177.png"'></image>
        </view>
        <text class='myTrack_fd2_1'>至</text>
        <view class='flex flex-wrap align-center justify-center myTrack_fd2_0' @tap.stop="popupShow1691652180194=true">
          <text class='flex-sub myTrack_fd2_0_c0' v-if="end_time==''">结束时间</text><text class='flex-sub myTrack_fd2_0_c0'
            v-if="end_time!=''">{{end_time}}</text>
          <image class='myTrack_fd2_0_c1' mode="aspectFit" :src='STATIC_URL+"177.png"'></image>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <benben-goods-footprint time-format='MM月DD日' price-before='￥' class='myTrack_flex_footprint_3'
        :is-editor.sync='is_edit' :goods-list.sync='dataList' :goods-id.sync='shop_id' v-model='detele_id'
        @handleDel="deteleFunc()" @handleGoods="jumpFunc()">
      </benben-goods-footprint>


    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "popupShow1691652180194": false,
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "dataList": [],
        "is_edit": false,
        "shop_id": "",
        "detele_id": "",
        "true": true,
        "falses": false,
        "start_time": "",
        "end_time": "",
        "dataGoodsList": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.queryListFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //切换编辑状态
      switchTypeFunc() {
        if (this.is_edit === false) {
          this.is_edit = this.true;
          return
        }
        if (this.is_edit === true) {
          this.is_edit = this.falses;
          return
        }
      },
      //获取足迹列表
      async queryListFunc() {
        //请求方法
        //数据验证
        this.minixPagingListsApi = global.apiUrls.post65d714ac89a9c;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          start_time: this.start_time,
          end_time: this.end_time
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

        this.popupShow1691652180194 = false;
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      },
      //删除足迹
      async deteleFunc() {
        //请求方法
        //数据验证

        let data64145e74b3a92 = await this.$api.post(global.apiUrls.post65d715216f183, {
          aid: this.detele_id
        });

        if (data64145e74b3a92.data.code != 1) {
          this.$message.info(data64145e74b3a92.data.msg);
          return
        }
        this.queryListFunc()
      },
      //点击商品
      jumpFunc() {

      },

      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #fff;
    background-size: 100% auto;
  }

  .myTrack_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .myTrack_fd0_0_c2_c0_1 {
    font-size: 32rpx;
    font-weight: 400;
    color: #333;
  }

  .myTrack_fd0_0_c2_c0 {
    font-size: 32rpx;
    font-weight: 400;
    color: var(--benbenFontColor4);
  }

  .myTrack_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 600;
    color: #333;
  }

  .myTrack_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: #333;
  }

  .myTrack_fd0_0_c0 {
    width: 180rpx;
  }

  .myTrack_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .myTrack_fd1_0 {
    background: #ffffff;
    width: 640rpx;
    border-radius: 16rpx;
    padding: 12rpx 012rpx 012rpx 012rpx;
  }

  .myTrack_flex_2 {
    padding: 24rpx 32rpx 24rpx 32rpx;
  }

  .myTrack_fd2_1 {
    font-size: 24rpx;
    margin: 0rpx 24rpx 0rpx 24rpx;
  }

  .myTrack_fd2_0_c1 {
    width: 30rpx;
    height: 30rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 4rpx 0rpx 0rpx 0rpx;
  }

  .myTrack_fd2_0_c0 {
    text-align: center;
    font-size: 24rpx;
  }

  .myTrack_fd2_0 {
    border: 1px solid rgba(191, 191, 191, 1);
    width: 245rpx;
    height: 56rpx;
    border-radius: 8rpx;
    padding: 0rpx 20rpx 0rpx 0rpx;
  }

  .myTrack_flex_footprint_3 {
    --checked-active: var(--benbenFontColor4);
  }

  .myTrack_flex_4 {
    padding: 51rpx 0rpx 33rpx 0rpx;
  }

  .myTrack_fd4_1 {
    font-size: 40rpx;
    font-weight: 600;
    color: #333;
    margin: 0rpx 24rpx 0rpx 24rpx;
  }

  .myTrack_fd4_0 {
    width: 138rpx;
    height: 28rpx;
  }

  .myTrack_flex_5 {
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .myTrack_fd5_0_c0_c3_c2 {
    color: #B2B2B2;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 33rpx;
    text-decoration: line-through;
    margin: 0rpx 0rpx -8rpx 11rpx;
  }

  .myTrack_price2_fd5_0_c0_c3_c1 {
    font-size: 22rpx;
  }

  .myTrack_price1_fd5_0_c0_c3_c1 {
    font-size: 32rpx;
    font-weight: 700;
  }

  .myTrack_fd5_0_c0_c3_c1 {
    color: #ff5536;
    font-weight: 700;
    font-size: 20rpx;
    line-height: 30rpx;
    margin: 6rpx 0rpx 0rpx 0rpx;
  }

  .myTrack_fd5_0_c0_c3_c0 {
    color: #EF3A3A;
    font-weight: 600;
    font-size: 20rpx;
  }

  .myTrack_fd5_0_c0_c3 {
    margin: 0rpx 20rpx 0rpx 20rpx;
  }

  .myTrack_fd5_0_c0_c2_c1 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 33rpx;
  }

  .myTrack_fd5_0_c0_c2_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 33rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .myTrack_fd5_0_c0_c2 {
    margin: 16rpx 20rpx 16rpx 20rpx;
  }

  .myTrack_fd5_0_c0_c1 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 700;
    line-height: 40rpx;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    margin: 24rpx 20rpx 0rpx 20rpx;
  }

  .myTrack_fd5_0_c0_c0 {
    width: 346rpx;
    height: 346rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
  }

  .myTrack_fd5_0_c0 {
    background: #FFFFFF;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    width: 344rpx;
    padding: 0rpx 0rpx 24rpx 0rpx;
    box-shadow: 0rpx 3rpx 30rpx #E8E8E8;
    margin: 0rpx 0rpx 20rpx 0rpx;
  }

  .myTrack_fd5_0 {
    margin: 0rpx 0rpx 0rpx 0rpx;
  }
</style>
